/**
 * $Id: ProductCategoryRepositoryImpl.java 19 2011-06-11 04:06:06Z feigme $
 */
package com.iary.infrastructure.orm.hibernate;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.iary.domain.model.product.category.ProductCategory;
import com.iary.domain.model.product.category.ProductCategoryRepository;

@Repository
public class ProductCategoryRepositoryImpl extends
		HibernateDao<ProductCategory, Long> implements
		ProductCategoryRepository {

	@SuppressWarnings("unchecked")
	public List<ProductCategory> getAll() {
		return getSession().createQuery(
				"from ProductCategory where parent_id is null order by idx").list();
	}

}
